Q: Pointer manipulation is generally more time-consuming than multiplication and division.
Solution: Use of pointers for merging reduces the speed of other operations. This is the main drawback of all advanced data structures.
Q: How many properties does a leftist heap support?
Solution: A leftist heap supports two properties- structural property, ordering property and a heap order property.
Q: In a leftist heap, the null path length of a null node is defined as?
Solution: In a leftist heap tree, the null path length of a null node with no children is defined as -1.
Q: How many nodes does a leftist tree with r nodes must have?
Solution: A leftist tree with r nodes on the right path is proved to have at least 2r-1 nodes. This theorem is proved by induction.
Q: Which of the following operations does not destroy the leftist heap property?
Solution: Performing insert and merge operations on the right path could destroy the leftist heap property. It is extremely easy to restore that property.
Q: What is the fundamental operation on leftist heap?
Solution: The fundamental operations on leftist heaps is merge. Insertion operation is a merge of a one-node heap with a larger heap.
Q: A leftist heap is also said to be a binary heap.
Solution: A leftist heap has a structural property and an ordering property which is similar to that of a binary heap. Hence, leftist heap is also said to be binary heap.
Q: What is the efficiency of merge used in leftist heaps?
Solution: The efficiency of merge operations in leftist heap is mathematically found to be O( log N) which is the same in binary heaps.
Q: What is the node path length of a node with 0 or 1 child?
Solution: The length of the shortest path from a node to a node without two children is defined as 0.
Q: Why is this heap named leftist heap?
Solution: The heap is named as leftist heap because it tends to have deep left paths. It follows that the right path ought to be short.
You Have Score    | /10 |